import { GlobalRegistry } from "../packages/designable-core/src";
import { ISchema } from "../packages/formily-react/src";

export const Card: ISchema & { Addition?: ISchema } = {
  type: "object",
  properties: {
    title: {
      type: "string",
      "x-decorator": "FormItem",
      "x-component": "Input",
    },
    extra: {
      type: "string",
      "x-decorator": "FormItem",
      "x-component": "Input",
    },
    type: {
      type: "boolean",
      enum: GlobalRegistry.getDesignerMessage("settings.cardTypes"),
      "x-decorator": "FormItem",
      "x-component": "Radio.Group",
      "x-component-props": {
        defaultValue: "",
        optionType: "button",
      },
    },
    bordered: {
      type: "boolean",
      "x-decorator": "FormItem",
      "x-component": "Switch",
      "x-component-props": {
        defaultChecked: true,
      },
    },
  },
};
